package com.yunji.hushuang.dynamicproxy;

import com.yunji.hushuang.common.HomeworkServiceImpl;
import com.yunji.hushuang.common.IHomeworkService;

/**
 * @author hushuang
 * @since 2019/10/14
 */
public class DynamicProxyTest {

    public static void main(String[] args) {
        IHomeworkService proxy2 = (IHomeworkService) MyProxy.newProxyInstance(
                new MyClassLoader(), new Class[]{IHomeworkService.class}, new MyInvocationHandler(new HomeworkServiceImpl())
        );
        proxy2.doHomework();
    }
}
